color chooser: give GSettings schema a path
authorMatthias Clasen <mclasen@redhat.com>
Wed, 23 Jan 2013 12:48:26 +0000 (07:48 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Jan 2013 12:48:26 +0000 (07:48 -0500)
The code is always instantiating this schema at a fixed location, so why
is it relocatable?

Add a path so that it shows up properly in dconf-editor, and from the
gsettings commandline tool.

gtk/gtkcolorchooserwidget.c
gtk/org.gtk.Settings.ColorChooser.gschema.xml

index 896a8f70f85ddbaa9d4d06aea610888a338cd134..be954a26687421d4800fd072c85f3380afb7a534 100644 (file)
@@ -526,8 +526,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
   gtk_color_swatch_set_icon (GTK_COLOR_SWATCH (button), "list-add-symbolic");
   gtk_container_add (GTK_CONTAINER (box), button);
 
-  cc->priv->settings = g_settings_new_with_path ("org.gtk.Settings.ColorChooser",
-                                                 "/org/gtk/settings/color-chooser/");
+  cc->priv->settings = g_settings_new ("org.gtk.Settings.ColorChooser");
   variant = g_settings_get_value (cc->priv->settings, "custom-colors");
   g_variant_iter_init (&iter, variant);
   i = 0;
index f707e469f043cecd830711b4890d639eb4afa809..57120569fe5136d15eece56d196ec49f8aabba63 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <schemalist>
 
-  <schema id='org.gtk.Settings.ColorChooser'>
+  <schema id='org.gtk.Settings.ColorChooser' path='/org/gtk/settings/color-chooser/'>
     <key name='custom-colors' type='a(dddd)'>
       <default>[]</default>
     </key>